/// 判断是否为空
bool isNotEmpty(String? text) {
  return text != null ? (text.isNotEmpty && text.length > 0) : false;
}

/// 判断是否为空
bool isEmpty(String? text) {
  return text != null ? text.isEmpty : true;
}

//  手机号加密
String phoneNumberStr(String? phone) {
  if (phone == null || phone == '') {
    return '';
  } else {
    String phoneNumberStr = phone.replaceFirst(new RegExp(r'\d{4}'), '****', 3);
    return phoneNumberStr;
  }
}
